<template>
	<view class="file-card" @click="info">
		<view class="u-flex u-flex-items-center u-m-b-20">
			<file-icon :format="data.format" :size="32" />
			<view class="u-m-l-32 u-flex-1">
				<view class="f-w-b f-s-15 u-line-1">{{ data.title }}</view>
				<view class=" download_title f-s-12">
					<text class="u-m-r-24">{{ data.size }}</text>
					<text class="u-m-r-24">{{ data.download }}次下载</text>
					<text>{{ data.field?.name }} | {{ data.module?.name }}</text>
				</view>
			</view>
		</view>
		<!-- <view class="u-flex u-flex-between u-flex-evenly">
			<view class="u-flex">
				<tag :text="data.module?.name" :left="5" background="#DCECFF" color="#2080F7"></tag>
				<tag :text="data.field?.name" background="#DCECFF" color="#2080F7"></tag>
			</view>
			<price :price="data.price" />
		</view> -->
		<up-line margin="20rpx 0 24rpx" color="#F3F3F3"></up-line>
	</view>
</template>

<script setup>
	import fileIcon from '@/components/common/file-icon/file-icon.vue'
	import tag from '@/components/common/tag.vue'
	import price from '@/components/common/price.vue';
	import {
		defineProps
	} from 'vue';
	const props = defineProps({
		data: Object
	})

	function info() {
		uni.navigateTo({
			url: '/subPackages/data/index?id=' + props.data.id
		})
	}
</script>

<style lang="scss" scoped>
	.file-card {
		background-color: #fff;
	}
</style>